<?php
// Step 5 of web-cp setup
//   Web-cp database configuration - e.g. Hostname, Database Name, Username, Password

if ($data['dbpass'] == "") {
	$data['dbpass'] = $cfg['dbpass'];
}
if ($data['dbname'] == "") {
	$data['dbname'] = $cfg['dbname'];
}
if ($data['dbuser'] == "") {
	$data['dbuser'] = $cfg['dbuser'];
}
?>
<!--BEGIN HTML-->
<!--<input type="hidden" name="step" value="4">
<input type="hidden" name="substep" value="a">-->
<!-- DATABASE CREATION -->
<div align="center">
<table border="0" cellpadding="0" cellspacing="0"><tr><td>
<table border="0" cellpadding="0" cellspacing="0" class="tblbg"><tr><td>
<table border="0" cellspacing="1">
<tr>
	<td colspan="3" class="tbltop">&nbsp;Database Configuration&nbsp;</td>
</tr>
<tr>
	<td class="row1"><b>&nbsp;Database Host&nbsp;</b></td>
	<td class="row2">&nbsp;<input type="text" name="data[dbhost]" size="25" maxlength="255" value="<?=(isset($data['dbhost'])?$data['dbhost']:'localhost');?>">&nbsp;</td>
	<td class="row2"><img src="/icon/question.png" width="24" height="24" onmouseover="popup(event,'Database Host')" onmouseout="popup(event,'Database Host')"></td>
</tr>
<tr>
	<td class="row1"><b>&nbsp;Database User&nbsp;</b></td>
	<td class="row2">&nbsp;<input type="text" name="data[dbuser]" size="25" maxlength="255" value="<?=(isset($data['dbuser'])?$data['dbuser']:'webcp');?>">&nbsp;</td>
	<td class="row2"><img src="/icon/question.png" width="24" height="24" onmouseover="popup(event,'Database User')" onmouseout="popup(event,'Database User')"></td>
</tr>
<tr>
	<td class="row1"><b>&nbsp;Database Password&nbsp;</b></td>
	<td class="row2">&nbsp;<input type="text" name="data[dbpass]" size="25" maxlength="255" value="<?=$data['dbpass'];?>">&nbsp;</td>
	<td class="row2"><img src="/icon/question.png" width="24" height="24" onmouseover="popup(event,'Database Password')" onmouseout="popup(event,'Database Password')"></td>
</tr>
<tr>
	<td class="row1"><b>&nbsp;Database Name&nbsp;</b></td>
	<td class="row2">&nbsp;<input type="text" name="data[dbname]" size="25" maxlength="255" value="<?=(isset($data['dbname'])?$data['dbname']:'webcp');?>">&nbsp;</td>
	<td class="row2"><img src="/icon/question.png" width="24" height="24" onmouseover="popup(event,'Database Name')" onmouseout="popup(event,'Database Name')"></td>
</tr>
</table>
</td></tr></table><br>
<!--END HTML-->
